package br.panthro.utils.text.TextField
{
	
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFormat;
	
	public class TextFieldFactory
	{
		
		
		public static function createTextField(text:String, size:Number, color:uint, x:Number, y:Number, align:String = TextFieldAutoSize.LEFT):TextField
		{
			var _textFormater:TextFormat = new TextFormat;
			_textFormater = new TextFormat();
			_textFormater.font = "Arial";
			_textFormater.bold = true;
			_textFormater.size = size;
			
			
			_textFormater.color = color;
			var tf:TextField = new TextField();
			tf.autoSize = align;
			tf.defaultTextFormat = _textFormater;
			tf.text = text;
			tf.x = x;
			tf.y = y;
			tf.selectable = false;
			
			return tf;	
		}
	}
}